<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>Mine Sweeper Clone: Riferimenti per il file grid_data.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Mine Sweeper Clone
   &#160;<span id="projectnumber">0.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generato da Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Cerca');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Pagina&#160;Principale</span></a></li>
      <li><a href="pages.html"><span>Pagine&#160;collegate</span></a></li>
      <li><a href="annotated.html"><span>Classi</span></a></li>
      <li class="current"><a href="files.html"><span>File</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Cerca" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Elenco&#160;dei&#160;file</span></a></li>
      <li><a href="globals.html"><span>Elementi&#160;dei&#160;file</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tutto</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classi</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>File</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funzioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variabili</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Tipi enumerati (enum)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Valori del tipo enumerato</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Definizioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pagine</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Composti</a> &#124;
<a href="#enum-members">Tipi enumerati (enum)</a> &#124;
<a href="#func-members">Funzioni</a>  </div>
  <div class="headertitle">
<div class="title">Riferimenti per il file grid_data.h</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header del modulo per la gestione della griglia principale.  
<a href="#details">Continua...</a></p>
<div class="textblock"><code>#include &lt;gtk/gtk.h&gt;</code><br/>
</div>
<p><a href="grid__data_8h_source.html">Vai al codice sorgente di questo file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Composti</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbutton__s.html">button_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Struttura dei dati relativi alla casella.  <a href="structbutton__s.html#details">Continua...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgrid__s.html">grid_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Struttura principale contenente tutte le caselle e lo stato corrente della partita.  <a href="structgrid__s.html#details">Continua...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Tipi enumerati (enum)</h2></td></tr>
<tr class="memitem:ac60e672db340e106d182c145915ff6ec"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ec">button_status_e</a> { <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ecacd6668600e27b9f0aa8b04f741701609">BS_NORMAL</a>, 
<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca33c4c0747ae46eff3bc6662664057174">BS_CHECKED</a>, 
<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca5728751a2b2236f7444d73c80a21c1ea">BS_MAYBE</a>, 
<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca8e265cf45b6a411dcecba4c646dc6b30">BS_PRESSED</a>
 }</td></tr>
<tr class="memdesc:ac60e672db340e106d182c145915ff6ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeratore dello stato attuale di visualizzazione della casella.  <a href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ec">Continua...</a><br/></td></tr>
<tr class="separator:ac60e672db340e106d182c145915ff6ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a552c6c640d3ee513b86b9653497bacd7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7">button_content_e</a> { <br/>
&#160;&#160;<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7acbaf93b8e1586a0772d94e91371cc0af">BC_NEAR0</a>, 
<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7ad8a0eb06acd570fde091656ca17ff3c8">BC_NEAR1</a>, 
<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a13ab8e112d3e0b5740d46a1b304c55c7">BC_NEAR2</a>, 
<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7af1f5a59d7cdaf96dfbd2539f28fa0b50">BC_NEAR3</a>, 
<br/>
&#160;&#160;<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7ac60efaedaa5dd208cf56ca5533e7ae8e">BC_NEAR4</a>, 
<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a0f786525c06ac58de50f3f803c0c5595">BC_NEAR5</a>, 
<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a70326b8dac95d6d637bc66b68df7b233">BC_NEAR6</a>, 
<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7aa65526cd1b4a0a54b58a4be112160238">BC_NEAR7</a>, 
<br/>
&#160;&#160;<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a6a08e1afb97f08cb6a8f6f753575aa7e">BC_NEAR8</a>, 
<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a2ac2410b5605a17bb2a2a0b3bddd901f">BC_MINE</a>
<br/>
 }</td></tr>
<tr class="memdesc:a552c6c640d3ee513b86b9653497bacd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeratore del contenuto della casella.  <a href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7">Continua...</a><br/></td></tr>
<tr class="separator:a552c6c640d3ee513b86b9653497bacd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af69955eeb7d7622a016e49dd7ebd90b3"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3">game_status_e</a> { <a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3aa10126e812019c70d6346d74e390e2c4">GS_NORMAL</a>, 
<a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3a81a64b07396bf48b5905f55c9422c2a0">GS_LOST</a>, 
<a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3aa27df3604b3122de50178dba05dc01e6">GS_WIN</a>
 }</td></tr>
<tr class="memdesc:af69955eeb7d7622a016e49dd7ebd90b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeratore dello stato della partita.  <a href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3">Continua...</a><br/></td></tr>
<tr class="separator:af69955eeb7d7622a016e49dd7ebd90b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Funzioni</h2></td></tr>
<tr class="memitem:a0362bc0ff2e902ce93b98e81b18c4dcc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#a0362bc0ff2e902ce93b98e81b18c4dcc">button_change_status</a> (const int acol, const int arow, const <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ec">button_status_e</a> astatus)</td></tr>
<tr class="memdesc:a0362bc0ff2e902ce93b98e81b18c4dcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cambia lo stato della singola casella.  <a href="#a0362bc0ff2e902ce93b98e81b18c4dcc">Continua...</a><br/></td></tr>
<tr class="separator:a0362bc0ff2e902ce93b98e81b18c4dcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7551336e59c21e051318955f1db81979"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#a7551336e59c21e051318955f1db81979">button_reveal</a> (const int acol, const int arow)</td></tr>
<tr class="memdesc:a7551336e59c21e051318955f1db81979"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cambia stato alle caselle adiacenti a quella data.  <a href="#a7551336e59c21e051318955f1db81979">Continua...</a><br/></td></tr>
<tr class="separator:a7551336e59c21e051318955f1db81979"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ad9e693abaeb2d138bd4d8d2502dc83"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#a1ad9e693abaeb2d138bd4d8d2502dc83">button_left_click</a> (const int acol, const int arow)</td></tr>
<tr class="memdesc:a1ad9e693abaeb2d138bd4d8d2502dc83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Esegui procedure per tasto sinistro su casella.  <a href="#a1ad9e693abaeb2d138bd4d8d2502dc83">Continua...</a><br/></td></tr>
<tr class="separator:a1ad9e693abaeb2d138bd4d8d2502dc83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b40bb00f792aa5ebe918302f6808b32"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#a1b40bb00f792aa5ebe918302f6808b32">button_right_click</a> (const int acol, const int arow)</td></tr>
<tr class="memdesc:a1b40bb00f792aa5ebe918302f6808b32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Esegui procedure per tasto destro su casella.  <a href="#a1b40bb00f792aa5ebe918302f6808b32">Continua...</a><br/></td></tr>
<tr class="separator:a1b40bb00f792aa5ebe918302f6808b32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc8e05b76cfc95a294e99edc3c70ea14"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#acc8e05b76cfc95a294e99edc3c70ea14">grid_check_win</a> ()</td></tr>
<tr class="memdesc:acc8e05b76cfc95a294e99edc3c70ea14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Controlla se la partita è stata vinta.  <a href="#acc8e05b76cfc95a294e99edc3c70ea14">Continua...</a><br/></td></tr>
<tr class="separator:acc8e05b76cfc95a294e99edc3c70ea14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc3b32b4cf478022311a9bc1de46c757"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#afc3b32b4cf478022311a9bc1de46c757">grid_delete</a> ()</td></tr>
<tr class="memdesc:afc3b32b4cf478022311a9bc1de46c757"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cancella la griglia principale.  <a href="#afc3b32b4cf478022311a9bc1de46c757">Continua...</a><br/></td></tr>
<tr class="separator:afc3b32b4cf478022311a9bc1de46c757"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad33782a4e6522be610af15ef1c66b9c5"><td class="memItemLeft" align="right" valign="top">gboolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#ad33782a4e6522be610af15ef1c66b9c5">grid_fill</a> (const int acols, const int arows, const int anummines, GtkWidget *agrid, GCallback ahandler)</td></tr>
<tr class="memdesc:ad33782a4e6522be610af15ef1c66b9c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Popola la griglia principale.  <a href="#ad33782a4e6522be610af15ef1c66b9c5">Continua...</a><br/></td></tr>
<tr class="separator:ad33782a4e6522be610af15ef1c66b9c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad872dc5649d8c969779f17ba3fcb007d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#ad872dc5649d8c969779f17ba3fcb007d">grid_init</a> ()</td></tr>
<tr class="memdesc:ad872dc5649d8c969779f17ba3fcb007d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inizializza la griglia principale.  <a href="#ad872dc5649d8c969779f17ba3fcb007d">Continua...</a><br/></td></tr>
<tr class="separator:ad872dc5649d8c969779f17ba3fcb007d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e76af3eee401e450c252044b0ef3d85"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#a8e76af3eee401e450c252044b0ef3d85">grid_lost_reveal</a> ()</td></tr>
<tr class="memdesc:a8e76af3eee401e450c252044b0ef3d85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Partita persa, rivela le caselle delle mine.  <a href="#a8e76af3eee401e450c252044b0ef3d85">Continua...</a><br/></td></tr>
<tr class="separator:a8e76af3eee401e450c252044b0ef3d85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f03d03c2c9e62e6d354064f5a5433db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="grid__data_8h.html#a2f03d03c2c9e62e6d354064f5a5433db">grid_win_reveal</a> ()</td></tr>
<tr class="memdesc:a2f03d03c2c9e62e6d354064f5a5433db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Partita vinta, rivela le caselle delle mine.  <a href="#a2f03d03c2c9e62e6d354064f5a5433db">Continua...</a><br/></td></tr>
<tr class="separator:a2f03d03c2c9e62e6d354064f5a5433db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Descrizione dettagliata</h2>
<div class="textblock"><p>Header del modulo per la gestione della griglia principale. </p>
<p>La griglia principale viene gestita tramite la variabile <a class="el" href="minesweeperclone_8cc.html#aa7ca018a15d077bfab0ecfd899428d44" title="Struttura dati principale contenente tutte le singole celle ed i relativi status (definita in grid_da...">grid</a> di tipo <a class="el" href="structgrid__s.html" title="Struttura principale contenente tutte le caselle e lo stato corrente della partita. ">grid_s</a>. Questa struttura contiene tutte le singole celle ed i relativi status ed è il fulcro del programma. </p>
</div><h2 class="groupheader">Documentazione dei tipi enumerati</h2>
<a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7">button_content_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enumeratore del contenuto della casella. </p>
<p>Sono stati scelti 10 stati diversi che indicano la presenza o meno di una o più mine nelle vicinanze della casella. La casella può contenere una mina (<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a2ac2410b5605a17bb2a2a0b3bddd901f" title="Presenza della mina. ">BC_MINE</a>) o essere vuota ed avere o meno nelle caselle contigue una o più mine (<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7acbaf93b8e1586a0772d94e91371cc0af" title="Vuota con 0 mine vicino. ">BC_NEAR0</a>..<a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a6a08e1afb97f08cb6a8f6f753575aa7e" title="Vuota con 8 mine vicino. ">BC_NEAR8</a>). </p>
<table class="fieldtable">
<tr><th colspan="2">Valori del tipo enumerato</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7acbaf93b8e1586a0772d94e91371cc0af"></a>BC_NEAR0</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 0 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7ad8a0eb06acd570fde091656ca17ff3c8"></a>BC_NEAR1</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 1 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7a13ab8e112d3e0b5740d46a1b304c55c7"></a>BC_NEAR2</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 2 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7af1f5a59d7cdaf96dfbd2539f28fa0b50"></a>BC_NEAR3</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 3 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7ac60efaedaa5dd208cf56ca5533e7ae8e"></a>BC_NEAR4</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 4 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7a0f786525c06ac58de50f3f803c0c5595"></a>BC_NEAR5</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 5 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7a70326b8dac95d6d637bc66b68df7b233"></a>BC_NEAR6</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 6 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7aa65526cd1b4a0a54b58a4be112160238"></a>BC_NEAR7</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 7 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7a6a08e1afb97f08cb6a8f6f753575aa7e"></a>BC_NEAR8</em>&nbsp;</td><td class="fielddoc">
<p>Vuota con 8 mine vicino. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a552c6c640d3ee513b86b9653497bacd7a2ac2410b5605a17bb2a2a0b3bddd901f"></a>BC_MINE</em>&nbsp;</td><td class="fielddoc">
<p>Presenza della mina. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ac60e672db340e106d182c145915ff6ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ec">button_status_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enumeratore dello stato attuale di visualizzazione della casella. </p>
<p>Sono stati scelti 4 stati diversi che rappresentano se la casella è allo stato iniziale (<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ecacd6668600e27b9f0aa8b04f741701609" title="Normale (stato iniziale, non premuto) ">BS_NORMAL</a>), se l'utente ha contrassegnato la casella come contenente una mina (<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca33c4c0747ae46eff3bc6662664057174" title="Contenente una mina. ">BS_CHECKED</a>), come probabilmente contenente una mina (<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca5728751a2b2236f7444d73c80a21c1ea" title="Probabilmente contenente una mina. ">BS_MAYBE</a>) o come premuta (<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca8e265cf45b6a411dcecba4c646dc6b30" title="Casella premuta. ">BS_PRESSED</a>) e quindi già visualizzato il suo contenuto (guardare <a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7" title="Enumeratore del contenuto della casella. ">button_content_e</a>). </p>
<table class="fieldtable">
<tr><th colspan="2">Valori del tipo enumerato</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ac60e672db340e106d182c145915ff6ecacd6668600e27b9f0aa8b04f741701609"></a>BS_NORMAL</em>&nbsp;</td><td class="fielddoc">
<p>Normale (stato iniziale, non premuto) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ac60e672db340e106d182c145915ff6eca33c4c0747ae46eff3bc6662664057174"></a>BS_CHECKED</em>&nbsp;</td><td class="fielddoc">
<p>Contenente una mina. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ac60e672db340e106d182c145915ff6eca5728751a2b2236f7444d73c80a21c1ea"></a>BS_MAYBE</em>&nbsp;</td><td class="fielddoc">
<p>Probabilmente contenente una mina. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ac60e672db340e106d182c145915ff6eca8e265cf45b6a411dcecba4c646dc6b30"></a>BS_PRESSED</em>&nbsp;</td><td class="fielddoc">
<p>Casella premuta. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="af69955eeb7d7622a016e49dd7ebd90b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3">game_status_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enumeratore dello stato della partita. </p>
<p>Sono stati scelti 3 stati diversi che indicano lo stato attuale della partita. Lo stato della partita può essere normale (<a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3aa10126e812019c70d6346d74e390e2c4" title="Stato partita normale. ">GS_NORMAL</a>), partita persa (<a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3a81a64b07396bf48b5905f55c9422c2a0" title="Stato partita persa. ">GS_LOST</a>) o partita vinta (<a class="el" href="grid__data_8h.html#af69955eeb7d7622a016e49dd7ebd90b3aa27df3604b3122de50178dba05dc01e6" title="Stato partita vinta. ">GS_WIN</a>). </p>
<table class="fieldtable">
<tr><th colspan="2">Valori del tipo enumerato</th></tr><tr><td class="fieldname"><em><a class="anchor" id="af69955eeb7d7622a016e49dd7ebd90b3aa10126e812019c70d6346d74e390e2c4"></a>GS_NORMAL</em>&nbsp;</td><td class="fielddoc">
<p>Stato partita normale. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="af69955eeb7d7622a016e49dd7ebd90b3a81a64b07396bf48b5905f55c9422c2a0"></a>GS_LOST</em>&nbsp;</td><td class="fielddoc">
<p>Stato partita persa. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="af69955eeb7d7622a016e49dd7ebd90b3aa27df3604b3122de50178dba05dc01e6"></a>GS_WIN</em>&nbsp;</td><td class="fielddoc">
<p>Stato partita vinta. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Documentazione delle funzioni</h2>
<a class="anchor" id="a0362bc0ff2e902ce93b98e81b18c4dcc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void button_change_status </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>acol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>arow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ec">button_status_e</a>&#160;</td>
          <td class="paramname"><em>astatus</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Cambia lo stato della singola casella. </p>
<p>Nel caso in cui si passi come nuovo stato <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca8e265cf45b6a411dcecba4c646dc6b30" title="Casella premuta. ">BS_PRESSED</a>, viene fatto anche un controllo del contenuto della casella e, se il contenuto è <a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7a2ac2410b5605a17bb2a2a0b3bddd901f" title="Presenza della mina. ">BC_MINE</a>, la partita si ferma.</p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">acol</td><td>Numero di colonna della casella </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arow</td><td>Numero di riga della casella </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">astatus</td><td>Nuovo stato </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1ad9e693abaeb2d138bd4d8d2502dc83"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void button_left_click </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>acol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>arow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Esegui procedure per tasto sinistro su casella. </p>
<p>Cambia lo stato della casella in <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca8e265cf45b6a411dcecba4c646dc6b30" title="Casella premuta. ">BS_PRESSED</a>, controlla il contenuto ed eventualmente rivela le caselle adiacenti.</p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">acol</td><td>Numero di colonna della casella </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arow</td><td>Numero di riga della casella </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7551336e59c21e051318955f1db81979"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void button_reveal </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>acol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>arow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Cambia stato alle caselle adiacenti a quella data. </p>
<p>Analizza le caselle adiacenti cambiandone lo stato in <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca8e265cf45b6a411dcecba4c646dc6b30" title="Casella premuta. ">BS_PRESSED</a> nel caso in cui siano comnprese tra <a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7acbaf93b8e1586a0772d94e91371cc0af" title="Vuota con 0 mine vicino. ">BC_NEAR0</a> e <a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7ad8a0eb06acd570fde091656ca17ff3c8" title="Vuota con 1 mine vicino. ">BC_NEAR1</a>. <br/>
 Se una casella adiacente è <a class="el" href="grid__data_8h.html#a552c6c640d3ee513b86b9653497bacd7acbaf93b8e1586a0772d94e91371cc0af" title="Vuota con 0 mine vicino. ">BC_NEAR0</a>, ne analizza le adiacenti tramite ricorsione.</p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">acol</td><td>Numero di colonna della casella </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arow</td><td>Numero di riga della casella </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1b40bb00f792aa5ebe918302f6808b32"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void button_right_click </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>acol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>arow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Esegui procedure per tasto destro su casella. </p>
<p>Cambia lo stato della casella permettendo di identificarla come casella con mina presente (<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca33c4c0747ae46eff3bc6662664057174" title="Contenente una mina. ">BS_CHECKED</a>), probabilmente presente (<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca5728751a2b2236f7444d73c80a21c1ea" title="Probabilmente contenente una mina. ">BS_MAYBE</a>) o normale (<a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ecacd6668600e27b9f0aa8b04f741701609" title="Normale (stato iniziale, non premuto) ">BS_NORMAL</a>).</p>
<p>Il cambio di stato è ciclico: <br/>
 <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ecacd6668600e27b9f0aa8b04f741701609" title="Normale (stato iniziale, non premuto) ">BS_NORMAL</a> -&gt; <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca33c4c0747ae46eff3bc6662664057174" title="Contenente una mina. ">BS_CHECKED</a> -&gt; <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6eca5728751a2b2236f7444d73c80a21c1ea" title="Probabilmente contenente una mina. ">BS_MAYBE</a> -&gt; <a class="el" href="grid__data_8h.html#ac60e672db340e106d182c145915ff6ecacd6668600e27b9f0aa8b04f741701609" title="Normale (stato iniziale, non premuto) ">BS_NORMAL</a> -&gt; ...</p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">acol</td><td>Numero di colonna della casella </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arow</td><td>Numero di riga della casella </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="acc8e05b76cfc95a294e99edc3c70ea14"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean grid_check_win </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Controlla se la partita è stata vinta. </p>
<p>Il controllo avviene in due modi:</p>
<ul>
<li>il numero di caselle segnate è uguale al numero di mine ed ognuna contiene una mina</li>
<li>il numero di caselle rimaste è uguale al numero mine (non c'è bisogno di controllare il contenuto) </li>
</ul>

</div>
</div>
<a class="anchor" id="afc3b32b4cf478022311a9bc1de46c757"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void grid_delete </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Cancella la griglia principale. </p>
<p>La funzione azzera la griglia principale distruggendo le caselle ed impostando i valori ad uno stato iniziale. </p>

</div>
</div>
<a class="anchor" id="ad33782a4e6522be610af15ef1c66b9c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gboolean grid_fill </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>acols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>arows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>anummines</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GtkWidget *&#160;</td>
          <td class="paramname"><em>agrid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GCallback&#160;</td>
          <td class="paramname"><em>ahandler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Popola la griglia principale. </p>
<p>La funzione esegue le seguenti procedure:</p>
<ul>
<li>azzera la griglia principale (nel caso che non sia già stata azzerata e nel caso in cui abbia dimensioni diverse da quella precedente)</li>
<li>inizializza la griglia</li>
<li>popola la griglia con le mine e con la quantità di mine presenti vicino alle caselle.</li>
</ul>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Da fare:</a></b></dt><dd>Per aggiungere le caselle alla griglia viene utilizzato <b>gtk_grid_attach</b> che sembra il motivo principale della lentezza quando la griglia comincia ad assumere dimensioni medio/grandi. <br/>
 Si potrebbe cercare una procedura diversa tipo <b>gtk_grid_attach_next_to</b> o <b>gtk_box_pack_start</b>. <br/>
 Se l'aggiunta è ancora lenta, si potrebbe sostituire la coppia di widgets GtkEventBox e GtkImage con il widget GtkButton.</dd></dl>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">acols</td><td>Numero di colonne della griglia (MIN 1) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arows</td><td>Numero di righe della griglia (MIN 1) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">anummines</td><td>Numero di mine (MAX arows * acols - 1) </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">agrid</td><td>Griglia dove verranno agganciate le caselle </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ahandler</td><td>Nome della funzione che gestirà l'evento click su ogni singola casella </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>True se la funzione è andata a buon fine, altrimenti false. </dd></dl>

</div>
</div>
<a class="anchor" id="ad872dc5649d8c969779f17ba3fcb007d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void grid_init </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inizializza la griglia principale. </p>
<p>Si utilizza unicamente dopo aver creato la variabile <a class="el" href="minesweeperclone_8cc.html#aa7ca018a15d077bfab0ecfd899428d44" title="Struttura dati principale contenente tutte le singole celle ed i relativi status (definita in grid_da...">grid</a> per impostare i valori principali della struttura. </p>

</div>
</div>
<a class="anchor" id="a8e76af3eee401e450c252044b0ef3d85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void grid_lost_reveal </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Partita persa, rivela le caselle delle mine. </p>
<p>Rivela la posizione di ogni mina rimasta ed eventualmente di quelle segnate in modo errato. </p>

</div>
</div>
<a class="anchor" id="a2f03d03c2c9e62e6d354064f5a5433db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void grid_win_reveal </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Partita vinta, rivela le caselle delle mine. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generato Gio 3 Apr 2014 21:57:36 per Mine Sweeper Clone da &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
